<!--
+----------------------------------------------------------------------
| 友得云客  - 开启房产营销新纪元
+----------------------------------------------------------------------
| Copyright (c) 2019~2023 优得（西安）信息科技有限公司版权所有
+----------------------------------------------------------------------
| Licensed 友得云客不是自由软件 未经允许不可移除相关版权
+----------------------------------------------------------------------
| Author: www.youdeyunke.com
+----------------------------------------------------------------------
-->
<template>
    <!-- 不需要该模块了 -->
    <div v-cloak>
        <el-form-item label="层级">
            <el-input-number :min="1" :max="1000" v-model="module.position.zIndex"></el-input-number>
        </el-form-item>

        <el-form-item label="定位方式">
            <el-select v-model="module.position.mode">
                <el-option key="static" label="默认" value="static">默认</el-option>
                <el-option key="fixed" label="悬浮" value="fixed">悬浮</el-option>
            </el-select>
        </el-form-item>

        <el-form-item label="左右距离">
            <el-input-number :min="0" :max="750" v-model="module.position.xValue"></el-input-number>
            <el-radio v-model="module.position.xMode" label="left">左</el-radio>
            <el-radio v-model="module.position.xMode" label="right">右</el-radio>
        </el-form-item>

        <el-form-item label="顶部距离">
            <el-input-number :min="0" v-model="module.position.yValue"></el-input-number>
            <el-radio v-model="module.position.yMode" label="top">顶部</el-radio>
            <el-radio v-model="module.position.yMode" label="bottom">底部</el-radio>
        </el-form-item>
    </div>
</template>

<script>
import SliderInput from "@/components/SliderInput";
export default {
    components: { SliderInput },
    data () {
        return {
            loading: false,
        };
    },
    props: {
        module: { type: Object, default: null },
    },

    mounted: function () {
        if (typeof this.module.position == "undefined") {
            var val = {
                mode: "static",
                xMode: "left",
                xValue: 0,
                yMode: "top",
                yValue: 0,
                zIndex: 10,
            };
            this.$set(this.module, "position", val);
        }
    },

    computed: {},

    methods: {},
};
</script>

<style scoped></style>
